package simulacao.modelo.pistas;



import javafx.scene.CustomNode;

import javafx.scene.Node;
import javafx.scene.paint.Color;
import javafx.scene.paint.LinearGradient;
import javafx.scene.paint.Stop;
import javafx.scene.shape.Rectangle;

public class RegiaoElevacao extends CustomNode {

    public-init var largura : Float;
    public-init var altura : Float;
    public-init var deslocamentoX : Float;
    public-init var deslocamentoY : Float;

    public override function create(): Node{
        return Rectangle {
                height: altura
                width: largura
                fill: LinearGradient {
                                startX : 0.0
                                startY : 0.0
                                endX : 1.0
                                endY : 0.0
                                stops: [
                                        Stop {
                                                color : Color.DIMGREY
                                                offset: 0.0
                                        },
                                        Stop {
                                                color : Color.BLACK
                                                offset: 1.0
                                        },
                                ]
                        }

                translateX: deslocamentoX
                translateY: deslocamentoY
                opacity: 0.9

        }
    }
}
